package yxy.apple.util.quartz;

import org.quartz.Job;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.impl.StdSchedulerFactory;

public class QuartzSchedulerManager {
    static private QuartzSchedulerManager instance;
    private Scheduler scheduler;

    public static QuartzSchedulerManager getInstance() {
        if (instance == null) {
            instance = new QuartzSchedulerManager();
        }
        return instance;
    }

    public Scheduler getScheduler() {
        return scheduler;
    }


    public void init () {
        try {
            scheduler = new StdSchedulerFactory().getScheduler();
            //scheduler.
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
